fetch("https://dxtk.ecnupress.com.cn/api/items/set/random?pageSize=20", {
    "headers": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0aXRsZSI6IjEiLCJleHAiOjE3MzA5Nzk4NDIsI" +
                "nVzZXJJZCI6IjI5MTUxIiwic3RhdHVzIjoiMSJ9.DkLJfxKINoWXD4P7wrs82TeMbHNg0Al0t-BPOM" +
                "ug-to"
    }
})
    .then(res => res.json())
    .then(data => console.log(data))

function shiftUnicode(str) {
    let shiftedStr = "";
    for (let i = 0; i < str.length; i++) {
        let unicode = str.charCodeAt(i);
        let shiftedUnicode = unicode + 10;
        shiftedStr += String.fromCharCode(shiftedUnicode);
    }
    return shiftedStr;
}

function recoverUnicode(str) {
    let shiftedStr = "";
    for (let i = 0; i < str.length; i++) {
        let unicode = str.charCodeAt(i);
        let shiftedUnicode = unicode - 10;
        shiftedStr += String.fromCharCode(shiftedUnicode);
    }
    return shiftedStr;
}

const str = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0aXRsZSI6IjEiLCJleHAiOjE3MzA5Nzk4NDIsInVzZXJJZCI6IjI5MTUxIiwic3RhdHVzIjoiMSJ9.DkLJfxKINoWXD4P7wrs82TeMbHNg0Al0t-BPOMug-to"
console.log(shiftUnicode(str))
console.log(recoverUnicode(shiftUnicode(str)))
console.log(str)
